﻿namespace WpfAdmin.Everything.Queryable {
    public interface ISizeQueryable : IQueryable {
        IQuery Equal(int value);
        IQuery Equal(int value, SizeUnit u);
        IQuery Equal(Sizes size);
        IQuery GreaterThan(int value);
        IQuery GreaterThan(int value, SizeUnit u);
        IQuery GreaterOrEqualThan(int value);
        IQuery GreaterOrEqualThan(int value, SizeUnit u);
        IQuery LessThan(int value);
        IQuery LessThan(int value, SizeUnit u);
        IQuery LessOrEqualThan(int value);
        IQuery LessOrEqualThan(int value, SizeUnit u);
        IQuery Between(int min, int max);
        IQuery Between(int min, int max, SizeUnit u);
        IQuery Between(int min, SizeUnit umin, int max, SizeUnit umax);
    }

    public enum Sizes {
        Empty,
        Unknown,
        /// <summary>
        /// 0 KB &lt; 大小 &lt;= 10 KB
        /// </summary>
        Tiny,
        /// <summary>
        /// 10 KB &lt; 大小 &lt;= 100 KB
        /// </summary>
        Small,
        /// <summary>
        /// 100 KB &lt; 大小 &lt;= 1 MB
        /// </summary>
        Medium,
        /// <summary>
        /// 1 MB &lt; 大小 &lt;= 16 MB
        /// </summary>
        Large,
        /// <summary>
        /// 16 MB &lt; 大小 &lt;= 128 MB
        /// </summary>
        Huge,
        /// <summary>
        /// 大小 > 128 MB
        /// </summary>
        Gigantic
    }

    public enum SizeUnit {
        Kb = 1,
        Mb,
        Gb
    }
}
